<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="copyright" content=""/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
	<title>设置-企业资料</title>
	<link href="https://cdn.jsdelivr.net/gh/bootcdn/BootCDN/ajax/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
	<link href="${pageContext.request.contextPath}/css/system/public.css" />
	<link href="${pageContext.request.contextPath}/css/system/set.css" rel="stylesheet">
	<link href="${pageContext.request.contextPath}/css/system/alert.css" rel="stylesheet">
	<link href="../favicon.ico" rel="shortcut icon">
	<link href="<%=path%>/hplus/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
	<link href="<%=path%>/hplus/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
	<link href="<%=path%>/hplus/css/plugins/iCheck/custom.css" rel="stylesheet">
	<link href="<%=path%>/hplus/css/animate.min.css" rel="stylesheet">
	<link href="<%=path%>/hplus/css/style.min862f.css?v=4.1.0" rel="stylesheet">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
	    <div class="container-fluid">
	            <div class="s_basics">
	                <ul class="s_basics_list">
						<shiro:hasPermission name="sys_company_update_button">
		               		<b><a href="javascript:;" id="editData">修改资料</a></b>
						</shiro:hasPermission>
	                    <li><span>公司</span><p id="c_name"></p></li>
	                    <li><span>地区</span><p id="c_city"></p></li>
	                    <li><span>行业</span><p id="c_industry"></p></li>
	                    <li><span>座机</span><p id="c_phone"></p></li>
	                    <li class="s_introduce"><span>企业介绍</span><p id="c_intro"></p></li>
	                    <li><span>企业业务</span><p id="c_business"></p></li>
	                    <li><span>企业营业执照</span>
	                    	<div id="scxs"></div>
	                        <a class="s_charter" href="javascript:;"  id="b_l"></a>
	                    </li>
	                    <!-- <li id="c_keyword"><span>行业关键字</span>
	                    </li>  -->
	                    	  <!-- <li>关注的关键字2个，还可录入3个</li> -->
	                  
	                </ul>
	            </div>
	     </div>
    </div>
    <div class="k_popup">
        <div class="k_issues">
            <div id="preview">
            	<img src="${pageContext.request.contextPath}/images/system/del.png" id="datu"/>
            </div>
            <span>
            	<img src="${pageContext.request.contextPath}/images/system/icon_close.png" />
            </span>            
        </div>
    </div> 
    <div class="s_popup_delect2">
        <div class="s_consum">
            <p id="dialog_title"><img src="${pageContext.request.contextPath}/images/system/s_tick.png" /></p>
        </div>
    </div>
</body>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
 <script type="text/javascript" src="${pageContext.request.contextPath}/js/system/exit.js"></script>
<script type="text/javascript">
        $(function(){
            /* $('#scxs').click(function(){
                $('.k_popup').show();
                $('.k_issues').show();
            }); */
            $(document).on('click','.xian',function(){
            	$('.k_popup').show();
                $('.k_issues').show();
            });
             $('.k_issues span').on('click',function(){
                $('.k_popup').hide();
            })
        })
    </script>
    
    <!-- LeeX -->
    <script type="text/javascript">
    
    $('#editData').click(function(){
    	window.location.href = "<%=path%>/ui/companyInfoEdit";
    });
    
    
    $(function(){
    		var url = "<%=path%>/api/company/show";
    		$.post(url,function(data){
    			if(data.error_code == "20028"){
    				showDialog(" 账户已被登陆，请重新登陆。");
    				setTimeout('window.location.href="http://scrm.cecook.cn/"',2000);
    			}
    			/* 公司名称 */
    			var c_name = data.name;
    			if(c_name==null){
    				$('#c_name').text("");
    			}else{
    				$('#c_name').text(data.name);
    			}
    			/* 地区 */
    			var c_city = data.city;
    			if(c_name==null){
    				$('#c_city').text("");
    			}else{
    				$('#c_city').text(data.city);
    			}
    			/* 行业 */
    			var c_industry = data.industry;
    			if(c_industry==null){
    				$('#c_industry').text("");
    			}else{
    				$('#c_industry').text(data.industry);
    			}
    			/* 企业介绍 */
    			var c_intro = data.intro;
    			if(c_intro==null){
    				$('#c_intro').text("");
    			}else{
    				$('#c_intro').text(data.intro);
    			}
    			/* 企业业务 */
    			var c_business = data.business;
    			if(c_business==null){
    				$('#c_business').text("");
    			}else{
    				$('#c_business').text(data.business);
    			}
    			/* 电话 */
    			var c_phone = data.phone;
    			if(c_phone==null){
    				$('#c_phone').text("");
    			}else{
    				$('#c_phone').text(data.phone);
    			}
    			/* 营业执照 */
    			var b_license = data.b_license;
    			if(b_license==null){
    				$('#scxs').html('未上传');
    			}else{
    				$('#scxs').html('<img src="'+b_license+'" class="xian" width="192px" height="119px">');
    				$('#datu').attr("src",b_license);
    				/* var strs = b_license.split("/");
    				for(var i = 0 ; i < strs.length ;i++){
    					if(i == strs.length - 1){
		    				$('.s_charter').text(strs[i]);
    					}
    				} */
    			}
    			/* 关键字 */
    			/* var kw = data.keyword;
    			var arr = kw.split(",");
    			if(arr[0] != ""){
	    			for(var i = 0 ; i < arr.length  ;i++){
	    				if(i == 5){
	    					return;
	    				}
	    				$('#c_keyword').append("<i>"+arr[i]+"</i>");
	    			}
    			} */
    			
    		}); 
    	});
    
</script>
<script type="text/javascript">
var auths = "<%=session.getAttribute("authoritys")%>";
</script>
</html>